<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>7-子绝父相</title>
		<style type="text/css">
			/*
				子绝父相这种设置，保证了原本的网页布局是正常的...
			*/
			*{
				margin:0;
				padding:0;
			}
			.nav{
				background: red;
				height:60px;
			}
			.box{
				width:500px;
				height:300px;
				background:orange;
				margin:0 auto;
				/*父-相对定位*/
				position: relative;
			}
			.son{
				width: 200px;
				height: 100px;
				background: blue;
				/*子-绝对定位*/
				position: absolute;
				right: 0;
				top:0;
			}
		</style>
	</head>
	<body>
		<div class="nav"></div>
		<div class="box">
			<div class="son"></div>
		</div>
		
		
	</body>
</html>
